import request from "@/utils/request";
// 标签列表
export function tagsList(query) {
  return request({
    url: "/commodity/tag/listPri",
    method: "get",
    params: query,
  });
}
//更新排序
export function changeSort(data) {
  return request({
    url: "/commodity/tag/changeSort",
    method: "put",
    data,
  });
}

//是否展示
export function changeShow(data) {
  return request({
    url: "/commodity/tag/isShow",
    method: "put",
    data,
  });
}

// 添加品牌
export function tagAdd(data) {
  return request({
    url: "/commodity/tag/add",
    method: "post",
    data,
  });
}
// 修改品牌
export function updateMallProductTagByPri(data) {
  return request({
    url: "/commodity/tag/updateMallProductTagByPri",
    method: "PUT",
    data,
  });
}
//查询详情
export function getMallProductTag(id) {
  return request({
    url: "/commodity/tag/getMallProductTag/" + id,
    method: "get",
  });
}
// 更新品牌
export function updateBrandedit(data) {
  return request({
    url: "/commodity/brand/edit",
    method: "post",
    data,
  });
}

// 删除品牌
export function delDept(deptId) {
  return request({
    url: '/commodity/tag/deletePriTag/' + deptId,
    method: 'delete'
  })
}
//是否再首页展示
export function handleShowIndex(data) {
  return request({
    url: "/commodity/brand/isShowIndex",
    method: "put",
    data,
  });
}
